var ip = "http://10.5.1.149:8080/prod-api"

export default{
	ip,
	get(url,method = 'get',content = null){
		return new Promise((resolve,reject) => {
			uni.request({
				url: ip + url,
				method: method,
				data: content,
				header:{
					"Authorization":uni.getStorageSync("token")
				},
				success: res => {
					let sj = JSON.parse(JSON.stringify(res.data).replace(new RegExp('/profile','g'),ip + '/profile'))
					resolve(sj)
				}
			});
		})
	},
	wea(a){
		var date = ["星期天","星期一","星期二","星期三","星期四","星期五","星期六"]
		return date[a]
	}
	
}